<?php
class BasePage extends Page {

	public function __construct($title = '', $content = '') {
		parent::__construct($title, $content);
	}

	public function respond() {
		$r = '<!doctype html>'.PHP_EOL;
		$r .= '<html lang="en">'.PHP_EOL;
		$r .= '  <head>'.PHP_EOL;
		$r .= '    <title>'.$this->title.'</title>'.PHP_EOL;
		$r .= '    <meta charset="utf-8">'.PHP_EOL;
		$r .= '    <meta http-equiv="X-UA-Compatible" content="IE=edge">'.PHP_EOL;
		$r .= '    <meta name="viewport" content="width=device-width, initial-scale=1">'.PHP_EOL;
		$r .= '    <!-- Bootstrap -->'.PHP_EOL;
		$r .= '    <link href="'.Util::url('css/bootstrap.min.css').'" rel="stylesheet">'.PHP_EOL;

		$r .= '    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->'.PHP_EOL;
		$r .= '    <!-- WARNING: Respond.js doesn\'t work if you view the page via file:// -->'.PHP_EOL;
		$r .= '    <!--[if lt IE 9]>'.PHP_EOL;
  		$r .= '      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>'.PHP_EOL;
  		$r .= '      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>'.PHP_EOL;
		$r .= '    <![endif]-->'.PHP_EOL;
		//$r .= '    <link href="css/sb-admin.css" rel="stylesheet">'.PHP_EOL;
		//$r .= '    <link href="css/extra.css" rel="stylesheet">'.PHP_EOL;
		
		$r .= '  </head>'.PHP_EOL;
		$r .= '  <body>'.PHP_EOL;
		$r .= '    <div id="wrapper">'.PHP_EOL;
		$r .= '      <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0;">'.PHP_EOL;
		$r .= '        <div class="navbar-header">'.PHP_EOL;
		$r .= '          <a class="navbar-brand" href="">'.$this->title.'</a>'.PHP_EOL;
		$r .= '        </div>'.PHP_EOL;
		$r .= '      </nav>'.PHP_EOL;
		$r .= '      '.$this->content.PHP_EOL;
		$r .= '    </div>'.PHP_EOL;
		$r .= '  </body>'.PHP_EOL;
		$r .= '</html>';
		return $r;
	}

}
?>